package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.WOutInfoDto;
import com.crm.jdy.common.pojo.TeamInfo;
import com.crm.jdy.common.pojo.WOutInfo;
import com.crm.jdy.common.mapper.WOutInfoMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(出库列表信息服务实现)
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class WOutInfoServiceImpl  extends ServiceImpl<WOutInfoMapper,WOutInfo> implements WOutInfoService  {

    @Autowired
    WOutInfoMapper wOutInfoMapper;

    @Override
    public PageInfo<WOutInfo> seleteWOutInfo(WOutInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<WOutInfo> bookList = wOutInfoMapper.seleteWOutInfo(wOutInfo);
        PageInfo<WOutInfo> pageInfo = new PageInfo<WOutInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateWOutInfo(WOutInfo wOutInfo) {
        return wOutInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addWOutInfo(WOutInfo wOutInfo) {
        return wOutInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeWOutInfo(String proId) {
        return wOutInfoMapper.deleteById(proId) > 0;
    }

}